package com.ruoyi.flowable.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.system.api.domain.SysRole;
import com.ruoyi.system.api.domain.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


@FeignClient(name = ServiceNameConstants.SYSTEM_SERVICE)
public interface SystemUserOpenFeign {
    @PostMapping("/toFlowableFeign/roleList")
    List<SysRole> listRole(@RequestBody SysRole role);

    @PostMapping("/toFlowableFeign/userList")
    List<SysUser> listUser(@RequestBody SysUser user);


    @PostMapping("/toFlowableFeign/selectUserById/{userId}")
    SysUser selectUserById(@PathVariable("userId") Long userId);

    @PostMapping("/toFlowableFeign/selectRoleById/{roleId}")
    SysRole selectRoleById(@PathVariable("roleId") Long roleId);

}
